/*
 * ConverterVisualPanel.java
 *
 * Created on Apr 3, 2011, 10:45:40 PM
 */
package carmesi.wizards;

import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import org.openide.WizardDescriptor;

/**
 *
 * @author Victor
 */
public class ConverterComponent extends CarmesiComponent implements DocumentListener {

    /** Creates new form ConverterVisualPanel */
    public ConverterComponent(WizardDescriptor descriptor) {
        super(descriptor);
        initComponents();
        classname.getDocument().addDocumentListener(this);
    }
    
    @Override
    public String getName() {
        return "Define Converter class";
    }
    
    public String getClassname(){
        return classname.getText();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        classname = new javax.swing.JTextField();

        jLabel1.setText(org.openide.util.NbBundle.getMessage(ConverterComponent.class, "ConverterComponent.jLabel1.text")); // NOI18N

        classname.setText(org.openide.util.NbBundle.getMessage(ConverterComponent.class, "ConverterComponent.classname.text")); // NOI18N

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(classname, javax.swing.GroupLayout.DEFAULT_SIZE, 308, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(classname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel1))
                .addContainerGap(19, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextField classname;
    private javax.swing.JLabel jLabel1;
    // End of variables declaration//GEN-END:variables

    @Override
    public void insertUpdate(DocumentEvent e) {
        fireChangeEvent();
    }

    @Override
    public void removeUpdate(DocumentEvent e) {
        fireChangeEvent();
    }

    @Override
    public void changedUpdate(DocumentEvent e) {
        fireChangeEvent();
    }
    
}
